const a = [[1,2,3],4,"hello",[5,6,0x234,[7,8]],[]]



const convertOpc = data => Array.isArray(data) ? 
	"( "+data.reduce((s,v)=> s+(Array.isArray(v) ? convertOpc(v) : " "+v+" "),"") +" )":
	""+data;


console.log(convertOpc(a))